package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author guozh
 */
@Mapper
public interface SetmealDishMapper {
    /**
     * 添加餐品套餐链接表
     * @param setmealDishes 餐品套餐链接表数据
     */
    void insertSetmealDishes(List<SetmealDish> setmealDishes);

    /**
     * 根据套餐id删除
     * @param setmealIds 套餐id
     */
    void deleteBySetmealIds(List<Long> setmealIds);

    /**
     * 根据套餐id查找
     * @param setmealId setmealId
     * @return List<SetmealDish>
     */
    @Select("select * from setmeal_dish where setmeal_id = #{setmealId}")
    List<SetmealDish> selectBySetmeaId(Long setmealId);


}
